<script>
	
	export default {
		onLaunch: function() {
			console.log('App Launch')
			const storeKeys = Object.keys(this.$store.state);
			storeKeys.forEach((key) =>{
				this.$store.state[key] = uni.getStorageSync(key);
			});
			// 更新缓存数据
			if(this.$store.state.$token){
				// this.$store.dispatch('getVips');
				this.$store.dispatch('getUserinfo');
			}
			// appInit().then((res) => {
			// 	console.log('appInit', res)
			// })
			// this.$store.dispatch('getHotelsConfigs');
			this.$store.dispatch('getSiteConfig');
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	@import "common/demo.scss";
	@import "common/common.scss";
	
	uni-tabbar.uni-tabbar-bottom .uni-tabbar { padding-bottom: 0 !important; }
</style>
